import { SET_HEADER_TITLE, SET_TOKEN, SET_USER, SET_USER_AVATAR } from "./mutation-type";

export default {
	//设置导航标题
	[SET_HEADER_TITLE]: (state, {headerTitles}) => {
		state.headerTitles = headerTitles;
	}, 
	//设置token
	[SET_TOKEN]: (state, {token}) => {
		state.token = token;
	},
	[SET_USER]: (state, {user}) => {
		if (user) {
			state.user = user;
		} else {
			state.user = {};
		}
	},
	[SET_USER_AVATAR]: (state, {avatar}) => {
		state.user.avatar = avatar;
	},
	

};
